import request from "@/utils/request";
import search from '@/utils/search'
import  { categoryPaging , wholeList,KeywordType} from "./search/index";


// 获取搜索分类列表
export const reqCategory = () => {
    return request<any,categoryPaging>({
        method:'GET',
        url:`/hotWordBillboardCategory`
    })
}


// 获取分类下的数据
export const reqWholeList = (categoryId:number,size:number) => {
    return search<any,wholeList>({
        method:'GET',
        url:`/hotWordBillboard/list/2.0?categoryId=${categoryId}&size=${size}`
    })
}


// 获取关键字搜索的数据
export const reqKeywordList = (kw:any,paidFilter:any) => {
    return request<any,KeywordType>({
        method:'GET',
        url:`/revision/suggest?kw=${kw}&paidFilter=${paidFilter}&scope=all`
    })
}